package com.stormrage.edu.dao.student.impl;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

import com.stormrage.edu.dao.student.StuInfoDao;
import com.stormrage.entity.student.StuInfo;
import com.stormragetech.core.dao.MysBaseDao;
import com.stormragetech.core.exception.StormrageTechException;

/**
 * @Title: StuInfoDaoImpl.java
 * @Package com.stormrage.edu.dao.student.impl
 * @Description: 学员账户信息 Dao
 * @author www.stormragetech.com
 * @date 2016年4月15日
 * @version V1.0
 */
@Repository
public class StuInfoDaoImpl extends MysBaseDao implements StuInfoDao {

	private static final Logger logger = LoggerFactory.getLogger(StuInfoDaoImpl.class);

	@Override
	public Integer create(StuInfo arg0) throws StormrageTechException {

		logger.debug(" 【 Dao 】-【 StuAcctDao 】-【 Create 】- 开始运行 ");

		final String query = "INSERT INTO stu_info (acct_id, real_name, id_card, depart, phone, email, address, zipcode) VALUES"
				+ " (:acctId, :realName, :idCard, :depart, :phone, :email, :address, :zipcode)";
		logger.debug(" 数据库执行语句为 " + query);

		Integer index = create(query, arg0);

		logger.debug(" 【 Dao 】-【 StuAcctDao 】-【 Create 】- 完成运行 ");
		return index;

	}

}
